#!/bin/bash
# filename='./home/amor/Download/xmind-8-linux.ZIP'
filename="./360compkill_5.1.0.1120.0709.zip"
# ext=$( echo ${filename} | awk -F '.' '{print $NF}' )
# echo ${ext}
# 把后缀转换为小写
# ext2l=$( echo $( echo ${filename} | awk -F '.' '{print $NF}' ) | tr 'A-Z' 'a-z')
# echo ${ext2l}


# echo dirname ${filename}

# echo `dirname ${filename} | awk -F "./" '{print $NF}'`
old_file_path=$(dirname ${filename} | awk -F '\\.\\/' '{print $NF}')/ # 获取源文件路径
echo ${old_file_path}
# echo $(dirname ${filename} | awk -F '\\.\\/' '{print $NF}')
